package com.citicpub_cloud.restfull.dao.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.citicpub_cloud.restfull.api.dto.ChapterDTO;

public class ChapterDTOMapper implements RowMapper<ChapterDTO> {  
	@Override
	public ChapterDTO mapRow(ResultSet rs, int index) throws SQLException {
		ChapterDTO obj = new ChapterDTO();
		obj.setTitle(rs.getString("title"));
		obj.setOrdernum(rs.getString("ordernum"));
		obj.setChapterUrl(rs.getString("chapter_url"));
		obj.setChapterSize(rs.getLong("chapter_size"));
		return obj;
	}
}
